#!/bin/bash

#获取当前sh目录
sh_dir=$(dirname $(realpath $0))
echo "${sh_dir}"

project_dir_local=${sh_dir}/../
project_dir_docker=/sam_dev

weight_dir_local=/home/bt/work/weights/sam
weight_dir_docker=/weights

image_dir_local=/home/bt/work/data/sam
image_dir_docker=/data

docker_image_name=lzc/sam:v2.1
docker_container_name=sam-dev

sudo docker run \
    --gpus '"device=0"' \
    --rm -it \
    --net host \
    --name ${docker_container_name} \
    -v ${project_dir_local}:${project_dir_docker} \
    -v ${weight_dir_local}:${weight_dir_docker} \
    -v ${image_dir_local}:${image_dir_docker} \
    -w ${project_dir_docker} \
    ${docker_image_name}
